<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>设备连接</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/MUIxinyingCss.css"/>
		<link rel="stylesheet" href="../css/default.css"/>
		<link rel="stylesheet" type="text/css" href="../css/feedback-page.css" />
	</head>
	<body class="mui-fullscreen">
		<!--页面主结构开始-->
		<div id="deviceApp" class="mui-views">
			<div class="mui-view">
				<div class="mui-navbar">
				</div>
				<div class="mui-pages">
				</div>
			</div>
		</div>
		<!--页面主结构结束-->
		<!--单页面开始-->
		<div id="device_connect" class="mui-page">
			<!--页面标题栏开始-->
			<div class="mui-navbar-inner mui-bar mui-bar-nav header_bar">
				<a href="##" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
					<span class="mui-icon mui-icon-left-nav"></span>
				</a>
				<h1 class="mui-center mui-title">云病历</h1>
			</div>
			<!--页面标题栏结束-->
			<!--页面主内容区开始-->
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<div class="mui-content">
							<dl>
								<dt>
									<div class="message_con margin">
							            <div class="active clear no_border">开启蓝牙/wifi
							            	<div class="mui-switch mui-active">
												<div class="mui-switch-handle"></div>
											</div>
							            </div>
								    </div>
								</dt>
								<dd>我的设备名称</dd>
							</dl>
							<dl>
								<dt>
									<h1>请输入设备ID</h1>
								</dt>
								<dd><input type="text" class="mui-icon-clear device_id_ip" /><a href="##" class="mui-btn mui-pull-right">匹配</a></dd>
							</dl>
							<dl>
								<dt>
									<h1>搜索到可用设备</h1>
								</dt>
								<dd class="clear">我的设备名称 <a href="##" class="mui-btn mui-pull-right" id="open_video">匹配</a></dd>
							</dl>
					    </div>
					</div>
					<a href="##" class="mui-btn mui-btn-block sear_device_btn">搜索设备</a>
				</div>
			</div>
			<!--页面主内容区结束-->
		</div>
		<!--单页面结束-->
		<script src="../js/mui.min.js "></script>
		<script src="../js/mui.view.js "></script>
		<script src='../js/jquery-1.11.1.js'></script>
		<script src='../js/strophe-custom-2.0.0.js'></script>
		<script src='../js/json2.js'></script>
		<script src="../js/easemob.im-1.0.5.js"></script>
		<script src='../js/feedback.js'></script>
		<script src="../js/feedback-page.js"></script>
	</body>
	<script>
		mui.init();
		//初始化单页view
		var viewApi = mui('#deviceApp').view({
			defaultPage: '#device_connect'
		});
		//初始化单页的区域滚动
		mui('.mui-scroll-wrapper').scroll();
		var view = viewApi.view;
		(function($) {
			//处理view的后退与webview后退
			var oldBack = $.back;
			$.back = function() {
				if (viewApi.canBack()) { //如果view可以后退，则执行view的后退
					viewApi.back();
				} else { //执行webview后退
					oldBack();
				}
			};
			document.getElementById("open_video").addEventListener('tap', function() {
				var btnArray = ['否', '是'];
				mui.confirm('是否开启即时影像？', '你已成功匹配到设备', btnArray, function(e) {
					if (e.index == 1) {
						mui.openWindow({
					    url: 'device_service.html', 
					    id:'device_service',
					    waiting:{
					      autoShow:true,//自动显示等待框，默认为true
					      title:'正在加载...'//等待对话框上显示的提示内容
					     }
					  	});
					} else {
						alert("未开启");
					}
				})
			});
			
		})(mui);
		
	</script>

</html>